Minor updates to rWHALE result aggregation functionality#408
Merged
Conversation
rWHALE used to blindly try to open every type of result file, collect the information and then check what to save in the output. Instead, this commit adds code that checks what outputs are requested and utilizes the existing argument of aggregate_results to ask for only a subset of output types if that's what the user needs.
The aggregate_results function was aggregating losses across components
for each asset. This is unnecessary since it is already done by Pelicun
earlier in the workflow. Aggregation can be more complex than simply
summing up losses for each component. So, it is more appropriate to use
the DL_summary_stats file directly and rely on Pelicun to take care of
the appropriate aggregation.
This commit modifies the code to drop the old functionality and utilize
DL_summary_stats.
In another, minor update, it also fixes a bug in naming.
R2Dres_mean_RepairCost is used when results are scaled with replacement
costs. When such scaling is not performed, the
R2Dres_mean_RepairCost_{cost_unit} naming is used. Consequently, when
loss ratios are returned by a method and we have replacement cost
available, rWHALE will return both the loss ratios and the absolute
losses.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.